<template>
  <div>
    <el-aside width="300px">
      <b>用户名</b>
      <el-input
        type="text"
        style="margin: 15px 0px"
        v-model="input"
        placeholder="用户名"
        ref="namer"
      ></el-input >
      <b>评论内容</b>
      <el-input
        style="margin: 15px 0px"
        type="textarea"
        :autosize="{ minRows: 2, maxRows: 4 }"
        placeholder="评论内容"
        v-model="textarea1"
        ref="titler"></el-input>
        <el-row style="text-align: right">
        <el-button @click="getInputValue">提交</el-button>
        </el-row>
    </el-aside>
    </div>
</template>

<script>
import {nanoid} from 'nanoid'
export default {
  name: "Myleft",
  methods:{
    getInputValue(){
      const todoObj = {id:nanoid(),Myname:this.$refs.namer.value,title:this.$refs.titler.value}
      console.log(todoObj);
    }
  },
  data() {
    return {
        input: "",
        textarea1: "",
    };
  }
};
</script>

<style>
</style>